<template>
  <div class="about">
    <h1 style="font-size: 30px;">英雄资料</h1>
    <ul style="font-size:20px;">
      <li v-for="(v,i) of list" :key="i">
        <router-link :to="{path:'/details',query:{i:i}}">{{v.type}}</router-link>
      </li>
    </ul>
  </div>
</template>
<script>
import axios from 'axios'
export default {
  data(){
    return {
      list:''
    }
  },
  methods:{
    ax(){
      axios.get('http://localhost:3000/data').then(res=>{
        this.list=res.data;
      })
    },
  },
  mounted(){
    this.ax();
  }
}
</script>
<style>
.about{
  width: 100%;
  height: 500px;
  background-color: aquamarine;
  
}
</style>
